#!/usr/bin/perl -w

use strict;
my $aclNum = $ARGV[0];
my $source = $ARGV[1];
my $dest = $ARGV[2];

if ( $aclNum eq "" ) {
  print("prog aclnum sourcx:sourcey:.. destx:desty:....\n");
} else {
  my @inList = split(':', $source);
  my @outlist = split(':', $dest);
  print("access-list $aclNum rem Start acl...\n");
  foreach my $inEntry (@inList) {
    foreach my $outEntry (@outlist) {
      print("access-list $aclNum permit ip $inEntry $outEntry\n");
    }
  }
  print("access-list $aclNum deny any any\n");
  print("access-list $aclNum rem end acl...\n");
}
